using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using App.Git.Vista.Widget;
using App.Modelo;
using App.Modelo.Interfaces;

namespace App.widgets
{
    public partial class BusquedaClientesControl : UserControl
    {
        public BusquedaClientesControl()
        {
            InitializeComponent();
        }


        public string FiltroNombre
        {
            get
            {
                return txtNombre.Text != "" ? "%" + txtNombre.Text + "%" : "";
            }
            set 
            {
                txtNombre.Text = value;
            }
        }

        public IDocumento FiltroDocumento
        {
            get
            {
                
                return txtIdentificacion.Text != "" ? new Documento
                                                          {
                                                              Tipo = "", Numero = txtIdentificacion.Text
                                                          } : null;
            }
            set 
            {
                txtIdentificacion.Text = value.Numero;
            }
        }

        public string FiltroDomicilio
        {
            get
            {
                return txtDomicilio.Text != "" ? "%" + txtDomicilio.Text + "%" : "";
            }
            set
            {
                txtDomicilio.Text = value;
            }
        }
    }
}
